{% extends "base.html" %}
{% block content %}

    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title" style="height:42px;">
                    站点记录
                    {% if guest_as|length >0 %}
                        <form role="form" style="margin-left: 3px;float:right;" action="/guest/delete">
                            <button type="submit" style="margin: 0px;" onclick="javascript:return confirm('确认要清空所有记录?')" class="btn btn-info btn-xs">清空记录</button>
                        </form>
                    {% endif %}
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th class="col-md-1">时间</th>
                                <th class="col-md-1">用户名</th>
                                <th class="col-md-1">访问IP</th>
                                <th class="col-md-1">端口</th>
                                <th class="col-md-1 hidden-xs">详细信息</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for row in guest_as %}
                                <tr>
                                    <td class="hidden-xs">{{ row.time|e }}</td>
                                    <td class="visible-xs">{{ row.time.split(' ')[1] }}</td>
                                    <td>{{ row.username|e }}</td>
                                    <td>{{ row.ip|e }}</td>
                                    <td>{{ row.port|e }}</td>
                                    <td class="hidden-xs">{{ row.http|e }}</td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

{% block navibar %}
    <div class="col-lg-10">
        <h2>站点记录</h2>
        <ol class="breadcrumb">
            <li>
                <a href="/">Home</a>
            </li>
            <li class="active">
                <strong>Guest</strong>
            </li>
        </ol>
    </div>
{% endblock %}
{% set active_page = "guest" %}